<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery-1.12.4.js"></script>
    <script src="../js/vue.js"></script>
    <script src="../js/cart.js"></script>
    <link rel="stylesheet" href="../css/cart.css">
</head>

<body>

    <div class="all">
        <div class="header">
            <div class="head">
                <div class="h-con">
                    <div class="h-con1">
                        <span>您好，欢迎光临特步官方商城！</span>
                    </div>
                    <ul class="h-con2">
                        <li>
                            <a href="javascript:void(0)">我的特步</a>
                        </li>
                        <li>
                            <a href="javascript:void(0)">品牌官网</a></a>
                        </li>
                        <li onmousemove="$('.h-show1').show()" onmouseout="$('.h-show1').hide()">
                            <div class="h-show">
                                <span class="h-img1">
                                    <img src="../images/18.png" alt="">
                                </span>
                                <a href="javascript:void(0)">手机特步</a>
                                <span class="h-img2">
                                    <img src="../images/19.png" alt="">
                                </span>
                            </div>
                            <div class="h-show1">
                                <img src="../images/20.jpg" alt="">
                            </div>
                        </li>
                        <li>
                            <div class="h-show2">
                                <span>
                                    <img src="../images/22.png" alt="">
                                </span>
                                <a href="">
                                    <span>购物车(</span>
                                    <span style="color: red;" class="msg">0</span>
                                    <span>)件</span>
                                </a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="content1">
                <div class="c1-con">
                    <div class="c1-con1"></div>

                    <div class="c1-con2">
                        <div class="c1-top">
                            <input type="text" name="" id="">
                            <Button class="c1-button">搜索</Button>
                        </div>
                        <div class="c1-bottom">
                            <a href="">热卖搜索：</a>
                            <a href="">减震旋跑鞋</a>
                            <a href="">山海休闲鞋</a>
                            <a href="">动力巢跑鞋</a>
                            <a href="">猫和老鼠联名款</a>
                            <a href="">游云篮球鞋</a>
                        </div>
                    </div>

                    <div class="c1-con3">
                        <div class="screen">
                            <ul>
                                <li>
                                    <img src="../images/21.jpg" width="210" height="70" />
                                </li>
                                <li>
                                    <img src="../images/21.jpg" width="210" height="70" />
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="content2">
            <div class="c2-con">
                <div class="c2-con-left">
                    <h3>
                        <a href="javascript:void(0)">全部商品分类</a>
                    </h3>
                    <ul class="c2-con-list">
                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">男鞋</a>
                                    </p>
                                    <tt>
                                        <a href="">跑步鞋</a>

                                        <a href="">篮球鞋</a>

                                        <a href="">板鞋</a>

                                        <a href="">休闲鞋</a>

                                        <a href="">跑步鞋</a>

                                        <a href="">跑步鞋</a>

                                        <a href="">跑步鞋</a>
                                    </tt>
                                </dt>
                            </dl>
                        </li>

                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">女鞋</a>
                                    </p>
                                    <tt>
                                        <a href="">跑步鞋</a>

                                        <a href="">篮球鞋</a>

                                        <a href="">板鞋</a>

                                        <a href="">休闲鞋</a>

                                        <a href="">跑步鞋</a>

                                        <a href="">跑步鞋</a>

                                        <a href="">跑步鞋</a>
                                    </tt>
                                </dt>
                            </dl>
                        </li>

                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">科技跑鞋</a>
                                    </p>
                                    <tt>
                                        <a href="">动力巢科技</a>

                                        <a href="">减震旋科技</a>

                                        <a href="">騛速科技</a>

                                        <a href="">竞速160X</a>

                                        <a href="">氢云科技</a>

                                        <a href="">驭能科技</a>

                                        <a href="">竞训260</a>
                                    </tt>
                                </dt>
                            </dl>
                        </li>

                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">潮流尖货</a>
                                    </p>
                                    <tt>
                                        <a href="">二次元</a>

                                        <a href="">机甲系列</a>

                                        <a href="">山海系列</a>

                                        <a href="">国潮天乘</a>

                                        <a href="">怪兽大学</a>

                                        <a href="">兔八哥联名</a>

                                        <a href="">猫和老鼠联名</a>

                                        <a href="">姜子牙联名</a>
                                    </tt>
                                </dt>
                            </dl>
                        </li>

                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">男装</a>
                                    </p>
                                    <tt>
                                        <a href="">运动T恤</a>

                                        <a href="">休闲T恤</a>

                                        <a href="">短裤</a>

                                        <a href="">长裤</a>

                                        <a href="">针织衫/卫衣/长T</a>

                                        <a href="">运动套装</a>

                                        <a href="">外套夹克</a>

                                        <a href="">棉服</a>

                                        <a href="">羽绒服</a>
                                    </tt>
                                </dt>
                            </dl>
                        </li>

                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">女装</a>
                                    </p>
                                    <tt>
                                        <a href="">运动T恤</a>

                                        <a href="">休闲T恤</a>

                                        <a href="">短裤</a>

                                        <a href="">长裤</a>

                                        <a href="">针织衫/卫衣/长T</a>

                                        <a href="">运动套装</a>

                                        <a href="">外套夹克</a>

                                        <a href="">棉服</a>

                                        <a href="">羽绒服</a>
                                    </tt>
                                </dt>
                            </dl>
                        </li>

                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">童鞋</a>
                                    </p>
                                    <tt>
                                        <a href="">跑步鞋</a>

                                        <a href="">篮球鞋</a>

                                        <a href="">板鞋</a>

                                        <a href="">休闲鞋</a>

                                        <a href="">健康鞋</a>

                                        <a href="">凉鞋</a>

                                    </tt>
                                </dt>
                            </dl>
                        </li>

                        <li>
                            <dl>
                                <dt>
                                    <p>
                                        <a href="">童装</a>
                                    </p>
                                    <tt>
                                        <a href="">短袖</a>

                                        <a href="">短裤</a>

                                        <a href="">长裤</a>

                                        <a href="">套装</a>

                                        <a href="">外套/夹克</a>

                                        <a href="">羽绒服棉服</a>

                                        <a href="">毛衣/卫衣/长袖T恤</a>
                                    </tt>
                                </dt>
                            </dl>
                        </li>
                    </ul>
                </div>

                <ul class="c2-con-right">
                    <li>
                        <a href="../html/home.html">首页</a>
                    </li>
                    <li onmouseenter="$(' .dw1').show()" onmouseleave="$('.dw1').hide()">
                        <a href="../html/run.html">跑步</a>
                    </li>
                    <li onmouseenter="$('.dw2').show()" onmouseleave="$('.dw2').hide()">
                        <a href="javascript:void(0)">男子</a>
                    </li>
                    <li onmousemove="$('.dw3').show()" onmouseout="$('.dw3').hide()">
                        <a href="javascript:void(0)">女子</a>
                    </li>
                    <li onmousemove="$('.dw4').show()" onmouseout="$('.dw4').hide()">
                        <a href="javascript:void(0)">儿童</a>
                    </li>
                    <li onmousemove="$('.dw5').show()" onmouseout="$('.dw5').hide()">
                        <a href="javascript:void(0)">配件</a>
                    </li>
                    <li onmousemove="$('.dw6').show()" onmouseout="$('.dw6').hide()">
                        <a href="javascript:void(0)">马拉松</a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">优惠券</a>
                    </li>
                </ul>
            </div>

            <div class="c2-show1 dw1" onmouseenter="$(' .dw1').show()" onmouseleave="$('.dw1').hide()">
                <a href="">
                    <img src="../images/paobu.jpg" alt="">
                </a>
                <ul>
                    <li>
                        <h4>
                            <a href="">男子跑步</a>
                        </h4>
                        <a href="">跑步鞋</a>
                        <a href="">跑步服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">女子跑步</a>
                        </h4>
                        <a href="">跑步鞋</a>
                        <a href="">跑步服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">新品推荐</a>
                        </h4>
                        <a href="">减震旋科技</a>
                        <a href="">动力巢科技</a>
                        <a href="">气能环科技</a>
                        <a href="">柔立方科技</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">专题</a>
                        </h4>
                        <a href="" class="s-red">氢风科技</a>
                        <a href="" class="s-red">以柔克刚</a>
                    </li>
                </ul>
            </div>

            <div class="c2-show1 dw2" onmouseenter="$(' .dw2').show()" onmouseleave="$('.dw2').hide()">
                <a href="">
                    <img src="../images/paobu.jpg" alt="">
                </a>
                <ul>
                    <li>
                        <h4>
                            <a href="">运动表现</a>
                        </h4>
                        <a href="">运动鞋</a>
                        <a href="">运动服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">运动生活</a>
                        </h4>
                        <a href="">休闲鞋</a>
                        <a href="">休闲服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">新品推荐</a>
                        </h4>
                        <a href="">减震旋科技</a>
                        <a href="">动力巢科技</a>
                        <a href="">气能环科技</a>
                        <a href="">柔立方科技</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">专题</a>
                        </h4>
                        <a href="" class="s-red">氢风科技</a>
                        <a href="" class="s-red">以柔克刚</a>
                    </li>
                </ul>
            </div>

            <div class="c2-show1 dw3" onmouseenter="$(' .dw3').show()" onmouseleave="$('.dw3').hide()">
                <a href="">
                    <img src="../images/paobu.jpg" alt="">
                </a>
                <ul>
                    <li>
                        <h4>
                            <a href="">运动表现</a>
                        </h4>
                        <a href="">运动鞋</a>
                        <a href="">运动服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">运动生活</a>
                        </h4>
                        <a href="">休闲鞋</a>
                        <a href="">休闲服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">新品推荐</a>
                        </h4>
                        <a href="">减震旋科技</a>
                        <a href="">动力巢科技</a>
                        <a href="">气能环科技</a>
                        <a href="">柔立方科技</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">专题</a>
                        </h4>
                        <a href="" class="s-red">氢风科技</a>
                        <a href="" class="s-red">以柔克刚</a>
                    </li>
                </ul>
            </div>

            <div class="c2-show1 dw4" onmouseenter="$(' .dw4').show()" onmouseleave="$('.dw4').hide()">
                <a href="">
                    <img src="../images/paobu.jpg" alt="">
                </a>
                <ul>
                    <li>
                        <h4>
                            <a href="">运动表现</a>
                        </h4>
                        <a href="">运动鞋</a>
                        <a href="">运动服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">运动生活</a>
                        </h4>
                        <a href="">休闲鞋</a>
                        <a href="">休闲服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">新品推荐</a>
                        </h4>
                        <a href="">减震旋科技</a>
                        <a href="">动力巢科技</a>
                        <a href="">气能环科技</a>
                        <a href="">柔立方科技</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">专题</a>
                        </h4>
                        <a href="" class="s-red">氢风科技</a>
                        <a href="" class="s-red">以柔克刚</a>
                    </li>
                </ul>
            </div>

            <div class="c2-show1 dw5" onmouseenter="$(' .dw5').show()" onmouseleave="$('.dw5').hide()">
                <a href="">
                    <img src="../images/paobu.jpg" alt="">
                </a>
                <ul>
                    <li>
                        <h4>
                            <a href="">运动表现</a>
                        </h4>
                        <a href="">运动鞋</a>
                        <a href="">运动服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">运动生活</a>
                        </h4>
                        <a href="">休闲鞋</a>
                        <a href="">休闲服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">新品推荐</a>
                        </h4>
                        <a href="">减震旋科技</a>
                        <a href="">动力巢科技</a>
                        <a href="">气能环科技</a>
                        <a href="">柔立方科技</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">专题</a>
                        </h4>
                        <a href="" class="s-red">氢风科技</a>
                        <a href="" class="s-red">以柔克刚</a>
                    </li>
                </ul>
            </div>

            <!-- <div class="c2-show1 dw6" onmouseenter="$(' .dw6').show()" onmouseleave="$('.dw6s').hide()">
                <a href="">
                    <img src="../images/paobu.jpg" alt="">
                </a>
                <ul>
                    <li>
                        <h4>
                            <a href="">运动表现</a>
                        </h4>
                        <a href="">运动鞋</a>
                        <a href="">运动服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">运动生活</a>
                        </h4>
                        <a href="">休闲鞋</a>
                        <a href="">休闲服</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">新品推荐</a>
                        </h4>
                        <a href="">减震旋科技</a>
                        <a href="">动力巢科技</a>
                        <a href="">气能环科技</a>
                        <a href="">柔立方科技</a>
                    </li>

                    <li>
                        <h4>
                            <a href="">专题</a>
                        </h4>
                        <a href="" class="s-red">氢风科技</a>
                        <a href="" class="s-red">以柔克刚</a>
                    </li>
                </ul>
            </div> -->
        </div>

        <div class="content3">
            <div class="c3-back"></div>
            <div class="c3-top">
                <div class="c3-con1"></div>
                <div class="c3-con2">
                    <i></i>
                    <span>
                        <a href="">购物车</a>
                    </span>
                    <b class="showLeng2">0</b>
                </div>
                <div class="c3-con3">
                    <i></i>
                    <span>
                        <a href="javascript:void(0)">联系客服</a>
                    </span>

                    <div class="c3-con3-show">
                        <a href="javascript:void(0)">
                            <img src="../images/24.png" alt=""
                                style="width: 120px;height: 109px;display: block;top: -50px;left: -40px;">
                        </a>
                        <i></i>
                        <a href="javascript:void(0)">
                            <img src="../images/25.png" alt=""
                                style="width: 120px;height: 50px;display: block;top: 59px;left: -40px;border-top: 1px solid #dfdfdf;">
                        </a>
                    </div>
                </div>
                <div class="c3-con4">
                    <a href="javascript:void(0)">
                        <i></i>
                    </a>
                    <div class="c3-con4-show">
                        <img src="../images/26.png" alt="">
                        <i></i>
                    </div>
                </div>
                <div class="c3-con5">
                    <i></i>
                    <div class="c3-con5-show">
                        <span>回到顶部</span>
                        <i></i>
                    </div>
                </div>
            </div>
        </div>

        <div class="MyCart">
            <div class="buzhou">
                <div class="pro-box-main">
                    <img src="../images/60.gif" alt="">
                </div>
            </div>

            <div class="pro-box-main">
                <h2 class="Myshopcart">我的购物车</h2>

                <div>
                    <div class="tab-shopper-box">
                        <table class="tab_shopper">
                            <thead>
                                <tr>
                                    <td>
                                        <input type="checkbox" @change="handleChange()" v-model="isAllChecked">全选
                                    </td>
                                    <td>
                                        商品
                                    </td>
                                    <td>
                                        市场价
                                    </td>
                                    <td>
                                        会员价
                                    </td>
                                    <td>
                                        数量
                                    </td>
                                    <td>
                                        小计
                                    </td>
                                    <td>
                                        操作
                                    </td>
                                </tr>
                            </thead>

                            <tbody class="checkChild">
                                <!-- <tr class="showTab"> -->
                                <tr v-for="(item,index) in oCartList">
                                    <td>
                                        <input type="checkbox" v-model="checkGroup" :value="item"
                                            @change="handLiChange">
                                    </td>
                                    <td class="maintd">
                                        <img :src=item.img alt="">
                                        <a href="javascript:void(0)">{{item.introduce}}</a>
                                        <br>
                                        颜色：黑
                                        尺码：39码
                                    </td>
                                    <td>￥269.00 </td>
                                    <td style="width: 100px;">￥{{item.price}} </td>
                                    <td style="display: flex;justify-content: center;margin-top: 20px;">
                                        <button class="sub" id="number" @click="sub(index)">-</button>
                                        <input type="text" name="num" id="num" value="1" :value='item.num'
                                            class="pronumber">
                                        <button class="sup" id="number" @click="sup(index)">+</button>
                                    </td>
                                    <td>￥{{item.price*item.num}}</td>
                                    <td>
                                        <a href="javascript:void()" class="del" @click.prevent='del(index)'>删除</a>
                                    </td>
                                </tr>

                                <tr>
                                    <td colspan="10" class="btnone">
                                        <label class="l">
                                            <input type="checkbox" @change="handleChange()" v-model="isAllChecked">全选
                                        </label>
                                        <a href="" class="alldel" @click.prevent='alldel()'>批量删除</a>

                                        <div class="tj">
                                            <div>
                                                <span class="numbercount">1</span>
                                                件商品
                                            </div>
                                            <p>
                                                支付积分：0
                                            </p>
                                            <p>
                                                缴纳税费：0
                                            </p>
                                        </div>
                                    </td>
                                </tr>

                                <tr style="background: #f7f7f7;">
                                    <td colspan="10" class="btnone">
                                        总计（不含运费）
                                        <span class="totalpriceBig">￥{{total}}</span>
                                        <div style="color: #666;font-size: 14px;">
                                            已节省：-¥0.00
                                        </div>
                                    </td>
                                </tr>
                            </tbody>

                            <tfoot>
                                <tr>
                                    <td colspan="10">
                                        <a href="javascript:void()" class="gobuy">
                                            <span>去结算</span>
                                        </a>
                                        <a href="../html/run.html" class="goonbuy">
                                            <span>继续购物</span>
                                        </a>
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="footer">
            <div class="f-con">
                <dl>
                    <dd>
                        <b>关于我们</b>
                        <span>
                            <a href="">公司简介</a>
                        </span>
                        <span>
                            <a href="">联系我们</a>
                        </span>
                    </dd>

                    <dd>
                        <b>购物指南</b>
                        <span>
                            <a href="">常见问题</a>
                        </span>
                        <span>
                            <a href="">用户注册</a>
                        </span>
                        <span>
                            <a href="">购物流程</a>
                        </span>
                    </dd>

                    <dd>
                        <b>售后服务</b>
                        <span>
                            <a href="">配送方式</a>
                        </span>
                        <span>
                            <a href="">防伪查询</a>
                        </span>
                    </dd>
                </dl>

                <div class="x-kf">
                    <h3>400-008-7666</h3>
                    <p>周一至周日 8:30-21:30</p>
                    <a href=""></a>
                    <p>周一至周日 9:00-23:00</p>
                </div>
            </div>
        </div>

        <div class="footer-img">
            <img src="../images/38.jpg" alt="">
        </div>

        <div style="background: white;">
            <div class="footer-msg">
                <ul>
                    <li>
                        <a href="">关于特步</a>
                    </li>
                    |
                    <li>
                        <a href="">人才招聘</a>
                    </li>
                    |
                    <li>
                        <a href="">帮助中心</a>
                    </li>
                    |
                    <li>
                        <a href="">友情链接</a>
                    </li>
                    |
                    <li>
                        <a href="">联系我们</a>
                    </li>
                </ul>
                <p>
                    特步跑鞋 Copyright 2011 xtep.com 特步运动服 All Rights Reserved 特步官方旗舰店 ICP：闽ICP备05021253号-1 特步官网专卖店
                </p>
                <div class="spare">
                    <a href="">
                        <img src="../images/39.png" alt="">
                        <p>
                            闽公网安备 35020302001628号
                        </p>
                    </a>
                </div>
            </div>

            <div class="aside">
                <div class="w">
                    <div class="pay">
                        <a href="">
                            <img src="../images/40.jpg" alt="">
                        </a>
                        <a href="">
                            <img src="../images/40.jpg" alt="">
                        </a>
                        <a href="">
                            <img src="../images/40.jpg" alt="">
                        </a>
                        <a href="">
                            <img src="../images/40.jpg" alt="">
                        </a>

                    </div>
                </div>
            </div>
        </div>

    </div>

    <script>
        let vue = new Vue({
            el: '.tab-shopper-box',
            created() {
                this.oCartList = JSON.parse(localStorage.getItem('cart') || '[]')
            },
            data: {
                oCartList: [],
                img: '',
                introduce: '',
                num: '',
                price: '',
                isAllChecked: false,
                checkGroup: [],
                isCreated: true,
            },
            methods: {
                del(index) {
                    alert('删除成功')
                    this.oCartList.splice(index, 1)
                    localStorage.setItem('cart', JSON.stringify(this.oCartList))
                    location = './cart.html'
                },
                sub(index) {
                    if (this.oCartList[index].num <= 1) {
                        return
                    }
                    this.oCartList[index].num--
                    localStorage.setItem('cart', JSON.stringify(this.oCartList))
                },
                sup(index) {
                    this.oCartList[index].num++
                    localStorage.setItem('cart', JSON.stringify(this.oCartList))
                },
                //全选函数
                handleChange() {
                    if (this.isAllChecked) {
                        this.checkGroup = this.oCartList;
                    } else {
                        this.checkGroup = [];
                    }
                },
                handLiChange() {
                    if (this.checkGroup.length === this.oCartList.length) {
                        this.isAllChecked = true;
                    } else {
                        this.isAllChecked = false;
                    }
                },

                // 批量删除
                alldel() {
                    this.oCartList = this.oCartList.filter(item => {
                        return this.checkGroup.indexOf(item) == -1
                    })
                    localStorage.setItem('cart', JSON.stringify(this.oCartList))
                    alert('购物车更新成功。')
                    location = './cart.html'
                }
            },
            computed: {
                // 总金额
                total() {
                    var totalPrice = 0
                    for (var i = 0; i < this.checkGroup.length; i++) {
                        totalPrice += this.checkGroup[i].price * this.checkGroup[i].num
                    }
                    return totalPrice
                },
            }

        })
    </script>

</body>

</html>